package cn.tedu.hospital.management.dao.persist.mapper;

import cn.tedu.hospital.management.pojo.entity.*;
import cn.tedu.hospital.management.pojo.param.HospitalParam;
import cn.tedu.hospital.management.pojo.vo.HospitalHospitalVO;
import cn.tedu.hospital.management.pojo.vo.HospitalStandardVO;
import cn.tedu.hospital.management.pojo.vo.HospitalVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface HospitalMapper extends BaseMapper<Hospital>{

    Long hospitalIdByName(String name);

    List<HospitalHospitalVO> selectAll();
    //插入数据到医院表
    //void insertHospital(Hospital hospital);

    /*查询城市id*/
//    @Select("select id from hospital_city where name = '邯郸市'")
    Long selectHospitalCityId(String name);

    /*查询等级id*/
    Long selectHospitalLevelId(String name);

    /*查询省份id*/
    Long selectHospitalProvinceId(String name);

    /*查询类型id*/
    Long selectHospitalTypeId(String name);

    /*根据id查询医院详情*/
    HospitalStandardVO getStandardById(Long id);

    List<HospitalVO> selectHospitals(HospitalParam hospitalParam);

    int avatar(Hospital hospital);
}
